class Model{
    constructor(data,message){
          if(typeof data==="string"){
          this.message=data
          }else{
              if(data) this.data=data;
              if(message) this.message=message
          }
    }
}
class successs extends Model{
    constructor(data,message){
         super(data,message)
         this.code=1
    }
}
class Errs extends Model{
    constructor(data,message){
      super(data,message)
      this.code=-1
    }
}
function success(data,message){
    return new successs(data,message)
}
function Err(data,message){
    return new Errs(data,message)
}
module.exports={
    success,Err
}